//Speed Math Game Play
//
#import <UIKit/UIKit.h>
#import "Equations.h"
#import "mathGameViewController.h"
#import "SoundController.h"

@interface SpeedMath : UIViewController <UIAlertViewDelegate>{
	int mode;	
	id displayField;
	id displayFieldEqn1;	
	UILabel *playerAnswerLabel;
	UILabel *corr;
	UILabel *eqn1Label, *eqn2Label, *eqn3Label;
	UILabel *numCorrectAnswersLabel;
	UILabel *numWrongAnswersLabel;
	UILabel *gameStatusLabel;
	UILabel *timeLimitLabel;
	UILabel *playerScoreLabel;
	UILabel *modeLabel;	
	UIButton *startButton;
	UIButton *buttons;
	UIButton *endEndlessPractice;	
	UITextField *hiddenTextField;	
	Equations *equationsModel;	
	NSTimer *endTimer;
	UIView *playView;
	UIView *difficultyViewSpeedMath;
	UIView *tutorialView;
	UIView *menuView;
	UIView *endOfGameView;
	UIView *currentView;	
	NSString *modeText;
	NSString *temporaryVariable;
	NSString *currTyped;
	NSString* playersAnswer;
	int answer1, answer2, answer3;
	int numCorrectAnswers;
	int numWrongAnswers;
	int numQuestions;
	int timeLimit;
	int playerScore;
	UILabel *gameModeLabel;
	UILabel *finalScoreLabel;
	UILabel *numCorrAnsLabel;
	UILabel *numIncorrAnsLabel;
	UILabel *timeUsedLabel;
	int timeUsed;
	SoundController *sound;
	BOOL soundToggle;//determines if sound is on or off
	
}
@property int mode;
@property (nonatomic, retain) IBOutlet UILabel *playerAnswerLabel;
@property (nonatomic, retain) IBOutlet UILabel *corr;
@property (nonatomic, retain) IBOutlet UILabel *eqn1Label;
@property (nonatomic, retain) IBOutlet UILabel *eqn2Label;
@property (nonatomic, retain) IBOutlet UILabel *eqn3Label;
@property (nonatomic, retain) IBOutlet UITextField *hiddenTextField;
@property (nonatomic, retain) IBOutlet UILabel *numCorrectAnswersLabel;
@property (nonatomic, retain) IBOutlet UILabel *numWrongAnswersLabel;
@property (nonatomic, retain) IBOutlet UILabel *gameStatusLabel;
@property (nonatomic, retain) IBOutlet UILabel *timeLimitLabel;
@property (nonatomic, retain) IBOutlet UILabel *playerScoreLabel;
@property (nonatomic, retain) IBOutlet UILabel *modeLabel;
@property (nonatomic, retain) IBOutlet UIButton *startButton;
@property (nonatomic, retain) IBOutlet UIButton *buttons;
@property (nonatomic, retain) IBOutlet UIButton *endEndlessPractice;
@property (nonatomic, retain) IBOutlet UIView *playView;
@property (nonatomic, retain) IBOutlet UIView *difficultyViewSpeedMath;
@property (nonatomic, retain) IBOutlet UIView *tutorialView;
@property (nonatomic, retain) IBOutlet UIView *menuView;
@property (nonatomic, retain) IBOutlet UIView *endOfGameView;
@property (nonatomic, retain) IBOutlet UIView *currentView;
@property (nonatomic, retain) IBOutlet UILabel *gameModeLabel;
@property (nonatomic, retain) IBOutlet UILabel *finalScoreLabel;
@property (nonatomic, retain) IBOutlet UILabel *numCorrAnsLabel;
@property (nonatomic, retain) IBOutlet UILabel *numIncorrAnsLabel;
@property (nonatomic, retain) IBOutlet UILabel *timeUsedLabel;
@property BOOL soundToggle;

-(void)setMode1;
-(void)setMode2;
-(void)setMode3;
-(void)setMode4;
-(void)initValues;
-(IBAction)startGame:(id)sender;
-(IBAction)returnToMenu:(id)sender;
-(void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
-(void)setMode:(int)input;
-(IBAction)punchEndGameCondition:(id)sender;
-(IBAction)displayTypedNumber:(id)sender;
-(IBAction)displayTypedOperand:(id)sender;
-(void)endGameCondition;
-(IBAction)displayEqns:(id)sender;
-(IBAction)punchEnter:(id)sender;
-(IBAction)punchBack:(id)sender;
-(IBAction)checkAnswer:(id)sender;
-(IBAction)changeEqns:(id)sender;
-(int)keepPoints:(id)sender;
-(void)mode1Timer;
-(void)mode234Timer;
-(void)showStatus;
-(IBAction)backnnnOne:(id)sender;
-(IBAction)backToGameModeMenu:(id)sender;
-(IBAction)backnnOne:(id)sender;
-(void) soundOn;
-(void) soundOff;

@end

